#ifndef COMPUTING_PERCEPTION_LIDAR_PROCESS_BOUNDINGBOX_H
#define COMPUTING_PERCEPTION_LIDAR_PROCESS_BOUNDINGBOX_H
#include "common/algorithm_type/lidar_cell_objs_type.h"
#include "common/algorithm_type/lidar_cell_type.h"
#include <iostream>
#include <limits>
#include <math.h>
#include <utility>
#include <vector>

namespace perception
{
    namespace algorithm
    {
        class BoundingBox
        {
        public:
            /// The construct methord of the class BoundingBox.
            BoundingBox();
            /// Compute lidar objects bounding box.
            /**
             * In this function, objects parameters are computed such as height, length, axis and width.
             * \param[in] lidar_objects clusted by cells.
             */
            void Compute(LidarObject &object);
            void ComputeLWH(LidarObject &object);
            void ComputeCornerPoints(LidarObject &object);

        private:
            CornerPoint GetCorner(float &a0, float &b0, float &c0, float &a1, float &b1, float &c1);
            void CoordinateTransformation(CornerPoint &cells, float &rad);
        };
    } // namespace perception
} // namespace avos
#endif // COMPUTING_PERCEPTION_LIDAR_PROCESS_BOUNDINGBOX_H